﻿using System;

namespace reb0x
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.WriteLine("Usage: reb0x [.rbs input file] [.xbp output file]");
                return;
            }

            try
            {
                RebirthFileReader rbsReader = new RebirthFileReader(args[0]);
                new X0xFileWriter(rbsReader.Patterns, args[1]);
                // nothing else to do, we're done :)
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message);
            }
        }
    }
}
